#!/usr/bin/env python
# Last Change: 2010-03-19 00:35:32

from base import manager

import libxml2
import re

def apply(doc):
  ctx = doc.xpathNewContext()
  for plugin in manager.getinst():
    pluginnode = ctx.xpathEval('/' + re.sub('[^\w]', '', plugin.name))
    if pluginnode:
      preftypes = plugin.getpref()
    else:
      pass
